/* 同步函数，直接更新state */
const SAVE_LOCALE = 'SAVE_LOCALE';
const SAVE_TOKEN = 'SAVE_TOKEN';
const SAVE_USER_INFO = 'SAVE_USER_INFO';

export default {
  // 存储语言
  [SAVE_LOCALE](state, locale) {
    state.locale = locale;
  },
  // 储存token
  [SAVE_TOKEN](state, token) {
    state.Authorization = token;
  },
  // 存储用户信息
  [SAVE_USER_INFO](state, userInfo) {
    state.userInfo = userInfo;
  } 
}